from datetime import datetime

from sqlalchemy import Column, String, DateTime, Integer
from sqlalchemy.orm import Session

from api.utils.base import Base


class LLM(Base):
    __tablename__ = "t_llm"
    id = Column(String, primary_key=True)
    name = Column(String, comment="模型名称")
    factory = Column(String, comment="模型工厂")
    create_time = Column(DateTime, comment="创建时间", default=datetime.now)
    update_time = Column(DateTime, comment="更新时间", default=datetime.now)
    base_url = Column(String, comment="基础url")
    status = Column(Integer, comment="状态", default=1)
    api_key = Column(String, comment="api key")
    secret_key = Column(String, comment="secret key")
    model_type = Column(String, comment="模型类型")
    token = Column(String, comment="token")
